/**
  * @file    :cpp20220408_5.2_scope of effect.cpp
  * @brief   :
  * @author  :renqiang
  * @version :V1.0.0
  * @date    :2022-04-08
  */
#include <iostream>
#include<stdio.h>

using namespace std;
int i;
int j;
class app{
    int a;
public:
    int b;
    app (int a, int b) : a(a), b(b) {}
    void fun(int c, int d){
        a = 2*c;
        b = 2*d;
        cout << "a = " << a << endl;
        cout << "b = " << b << endl;
    }
};
void A(int a, int b){
        cout << a << "-" << b << endl;
    };


int main(){

    A(11, 22);

    i = 10;
    j = 20;
    {
    int i = 100;
    int j = 200;
    app app1(i, j);
    app1.fun(i, j);
    }
    app app1(i, j);
    app1.fun(i, j);
    return 0;
}
